import { IsOptional } from 'class-validator';
import { IsNumberOrNumberString } from './custom.validator';

export class Limit {
  @IsOptional()
  @IsNumberOrNumberString({
    message:
      'limit.page must be a number conforming to the specified constraints',
  })
  page?: number;

  @IsOptional()
  @IsNumberOrNumberString({
    message:
      'limit.psize must be a number conforming to the specified constraints',
  })
  psize?: number;
}
